import { ShaohuoPersonService } from 'services/Api'

/* 状态相关（恢复禁用按钮）
-------------------------- */
export const identityStatusMixin = {
  data () {
    return {
      status: '' // 状态:1为有效,0为禁用
    }
  },
  computed: {
    // 修改捎货人身份类型状态参数
    alterShaohuoTypeStatusParam () {
      return {
        acc_id: this.acc_id,
        ust_ids: this.selectIds,
        status: this.status
      }
    }
  },
  methods: {
    // 改变捎货人身份类型状态接口
    currentStatusApi () {
      return ShaohuoPersonService.alterShaohuoTypeStatus(this.alterShaohuoTypeStatusParam)
    }
  }
}

/* 删除相关
-------------------------- */
export const identityDeleteMixin = {
  computed: {
    // 删除捎货人身份类型参数
    deleteShaohuoTypeStatusParam () {
      return {
        acc_id: this.acc_id,
        ust_ids: this.selectIds,
        status: '2'
      }
    }
  },
  methods: {
    // 删除接口
    currentDeleteApi () {
      return ShaohuoPersonService.alterShaohuoTypeStatus(this.deleteShaohuoTypeStatusParam)
    }
  }
}
